package com.house.mapper;

import com.house.entity.News;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface NewsMapper {
    int insertOne(@Param("userId")int userId,@Param("houseId")int houseId,@Param("price")String price,@Param("inf")String inf,@Param("telphone")String telphone);
    List<News> findAllByHouseId(@Param("houseId")int houseId);
    List<News> findAllByUserId(@Param("userId")int userId);
    News findById(@Param("id")int id);
    int deleteById(@Param("id") int id);
}
